<template>
<section class="section-box">
    <section-title>
        <h3>项 目 经 验</h3>
        <p>Project Experience</p>
    </section-title>
    <template v-for="item in projects">
        <project-list :projects="item" :key="item.id"></project-list>
    </template>
</section>
</template>

<script>
import sectionTitle from "@/components/section-title";
import projectList from "@/components/project-list";
import {
    fetchList
} from "../api";
export default {
    name: "MySkills",
    data() {
        return {
            projects: [],
        };
    },
    components: {
        sectionTitle,
        projectList,
    },
    methods: {
        fetchList() {
            fetchList()
                .then((res) => {
                    this.projects = res.data || [];
                })
                .catch((err) => {
                    console.log(err);
                });
        },
    },
    mounted() {
        this.fetchList();
    },
};
</script>
